XML Layout

skininfo Name Description
author Author of the skin.
name Name of the skin.
notes Notes for the skin
version Version information of the skin
reqversion Required Version needed for this skin.
skinvisible This will make the desklet visible or not in the add desklet list.
skindata / desklet Name Description
alpha Alpha value of the desklet. Value is 0-255.
animdelay Millisecond delay used to "animate" the key press for all layers.
autoredrawxml Force an autodraw of the desklet when XML is update. Default is true.
bindthis Allows you to unbind the this variable to the desklet. You can still use desklet variable to refer to the desklet. Default is true.
ctrlresources Control resource path for the images.
initialside Initial side the desklet will use when creating the desklet the first time. Note, that the desklet will not use this on loading of the desklet.
include Include is the name of the script file you wish to include. You can repeat this for each item
label Label of the desklet. This is the label seen under the desklet.
language Scripting language used (Javascript or VBScript).
resources This contains the path to all resource files. Image, scripts etc are all resource files.
sublabel Sublabel of the desklet. This label is seen under the desklet label.
script Script file name loaded loaded into the engine. Other script files can be added by using the include item.
usewintmp Save cached files in the windows temp location or internet cache location.
onafterflip occurs after the desklet is flipped
onbeforeflip occurs before the desklet is flipped
onchardown code that is triggered when a keyboard char key is pressed. Not special keys
oncreate code triggered on the creation of the desklet
ondeselect occurs when the user unselects the desklet
ondestroy code triggered on the removal of the desklet
ondropfile occurs when a file is dropped on the desklet
onkeydown/onkeypress code that is triggered when a keyboard key is pressed DOWN
onmouseenter occurs when mouse enters the desklet area
onmouseexit occurs when mouse exits the desklet area
onmousemove occurs when mouse moves on the desklet area
onmousescroll occurs when mouse scroller is changed while the mouse is on the desklet
onselect occurs when the user selects the desklet
skindata / sides Name Description
side Each side is defined in this area.
Example
<sides> <side id="0" width="550" height="300" closex="0" closey="0"/> </sides>
Node Attributes
id This defines which side you're specifying the settings for. Starts at 0, maximum of 255
width Width of the desklet side
height Height of the desklet side
closex X position for the close button
closey Y Position for the close button
skindata / xmls Name Description
xml Each XML data source is defined here. A XML datasource defines the location of where the XML data will be retreived from.
Example
<xmls> <xml src="http://xoap.weather.com/weather/local/%LOCALCODE%?cc=*&amp;unit=%UNIT%&amp;dayf=6" interval="125" usewintmp="yes" ongetdata="SetSun()"/> </xmls>
Node Attributes
- The ID of the XML is the order in which it is defined in the skin. Starts from 0. This is important to keep note, since this will be used in the scripting portion.
src This defines the internet/local path to the xml file. Only local paths can be read/write. file://path is the method to define a local path
interval This defines the interval between refreshes/downloads of xml data. If you set 0, then it will never autorefresh. The interval time is in minutes. If you put 5 as a value then that means the xml data will be autorefresh every 5 mins. *SysVar
usewintmp Saves the cache file in one of Windows Temporary Directories or the Internet cache directory.
ongetdata Defines the code that will be executed when the data is refreshed.
skindata / timers Name Description
timer Each timer can be defined here with all the different parameters.
Example
<timers> <timer name="sunrise" interval="!XMLSRC:1[//loc/sunr]" type="3" ontimer="SetSun()"/> </timers>
Node Attributes
name Name of the timer
interval The interval used to trigger the timer event. The value used depends on the type.
type Timer Type (0 Delay will time in Milliseconds, 1 Delay will time in Milliseconds and end itself after one execution, 2 Time/Date will execute once only, 3 Time/Date will execute all the time, 4 Cron will time in seconds (example: 1800 = every 30mins on the 30min mark, 5 is equal to 0 except the time is reset after each time the event is fired)
ontimer Code that is triggered when the timer time is expired.
skindata / parameters Name Description
parameter Each parameter name is defined here. It can then be access in any "sysvar" enabled area. To use any param you must encapsulate it in %. Example %TEST%.
Example
<parameters> <param name="LOCALCODE" default="CAXX0301" save="yes"/> </parameter>
Node Attributes
name Name of the parameter
default The default value used for the first time
save Allows the parameter to be saved or not
onupdate Code that is triggered when the specified time has expired. *SysVar
skindata / layers Name Description
side Each group of layers can represent the side of the desklet. The value of side tells us what side to draw the layer.
layer Each layer in the group is defined here. A layer can also have a child layer
Example
<layers side="1"> <layer name="background" src="back.png" x="0" y="0" alpha="255" /> </layers>
Node Attributes
alpha The alpha value of the layer
centersrc yes/no Is layer centered
clickable yes/no Let's the layer become clickable
clipsource The initial clip area used for the layer. This is represented by 4 numbers. These 4 number xy of the clip rectangle. (X1,Y1,X2,Y2)
data This is a field that allows you to store any extra data that might be used in your scripts.
dsrc Source of the layer when the image is in Down mode. Refer to source options for more info.
fontaa yes/no Defines if the text will be anti-aliased
fontalign Font alignment used in the layer. The value is a string value containing any of the following. "LCRTMB" L=Left aligned, C=Centered, R=Right, T=Top, M=Middle, B=Bottom
fontcolor Font color used in the layer. This can be represented by a RGB value or "Delphi" color names. #FF000 would be the RGB value for Red
fontname Font name used in the layer
fontsize Font size used in the layer
fontstyle Font style used in the layer. The value is a string value containing any of the following, "BIUS" B=Bold, I=Italic, U=Underline, S=Strike Out
fullhittest yes/no Is the click area performed on the entire rectangle of the layer or only on the area that has pixels defined.
height Height of the layer
imagecolor Allows you to define the color of the image. This will override all the pixels of the image with 1 color
key Let's the layer become clickable
maskminvalue The mask start range used.
maskvalue If two images are defined in the source, then the mask value will determine how to draw the image. The value range is 0-255, which represents the luminence of the 2nd image. Example on how to use 2 images to create progress bar. You define the first image as the complete progress bar, and the second image is a grayscale area that you wish to mask depending on the luminence of the pixel vs the maskvalue.
msrc Source of the layer when the image is in Mouse Over mode. Refer to source options for more info.
mousecursor The string value of the cursor you want to display when a mouse goes over the layer. (crDefault, crArrow, crCross, crIBeam, crSizeNESW, crSizeNS, crSizeNWSE, crSizeWE, crUpArrow, crHourGlass, crDrag, crNoDrop, crHSplit, crVSplit, crMultiDrag, crSQLWait, crNo, crAppStart, crHelp, crHandPoint, crSizeAll, IDC_ARROW, IDC_IBEAM, IDC_WAIT, IDC_CROSS, IDC_UPARROW, IDC_SIZE, IDC_ICON, IDC_SIZENWSE, IDC_SIZENESW, IDC_SIZEWE, IDC_SIZENS, IDC_SIZEALL, IDC_NO, IDC_HAND, IDC_APPSTARTING, IDC_HELP)
name Name of the layer
offsetx offsetx of the text in the layer
offsety offsety of the text in the layer
scale yes/no Show the layer image be scaled or not
scaleproportional yes/no Scale the layer proportinal in the layer rect area.
src Source of the layer when the image is in UP mode. Refer to source options for more info.
text This will overwrite the src value with a text value instead.
textresize yes/no Should the layer resize to fit the entire text.
visible yes/no Make the layer visible or not
width Width of the layer
x X position of the layer
y Y position of the layer
onclick Event for when the mouse click occurs
onmousedn Event for when the mouse button is pressed down
onmouseenter Event for when the mouse enters the layer
onmouseexit Event for when the mouse exits the layer
onmousemove Event for when the mouse is moving of a layer
onmouserightclick Event for when the mouse right click occurs
onmousescroll Event for when the mouse scroller is triggered while the mouse is on the layer
onmouseup Event for when the mouse button is up from a down (right after you click on the desklet and let go)
childlayer child layer options
Node Attributes
fontaa yes/no Defines if the text will be Anti-Aliased or not
fontalign Font alignment used in the layer. The value is a string value containing any of the following. "LCRTMB" L=Left aligned, C=Centered, R=Right, T=Top, M=Middle, B=Bottom
fontcolor Font color used in the layer. This can be represented as a RGB value or "Delphi" color names. #FF000 would be the RGB value for Red
fontname Font name used in the layer
fontsize Font size used in the layer
fontstyle Font style used in the layer. The value is a string value containing any of the following, "BIUS" B=Bold, I=Italic, U=Underline, S=Strike Out
height Height of the layer
name Name of the layer
offsetx offsetx of the text in the layer
offsety offsety of the text in the layer
src Source of the layer when the image is in UP mode. Refer to source options for more info.
width Width of the layer
x X position of the layer
y Y position of the layer
skindata / activexcontrols Name Description
side Each group of activexcontrol can represent the side of the desklet. The value of side tells us what side to draw the layer.
activexcontrol Each activexcontrol in the group is defined here.
Example
<activexcontrols> <activexcontrol name="flash" x="1" y="1" width="300" height="300" classid="ShockwaveFlash.ShockwaveFlash.1" /> </activexcontrols>
<activexcontrols> <activexcontrol name="flash" x="1" y="1" width="300" height="300" classid="{D27CDB6E-AE6D-11cf-96B8-444553540000}" /> </activexcontrols> This sample will also load the shockwave, but defined by the GUID instead.
Node Attributes
alpha The alpha value of the layer
bgcolor This will set the background color for the activexcontrol
classid This will determine what is the activexcontrol that will be used. Setting the classid prefix with CLASSID:{ or { will tell all you to use the GUID instead of the active x name.
height Height of the layer
name Name of the layer
transparentcolor This will set the activexcontrol transparency color
visible yes/no Make the layer visible or not
width Width of the layer
x X position of the layer
y Y position of the layer
skindata / controls Name Description
side Each group of controls can represent the side of the desklet. The value of the side tells us what side to draw the layer.
control Each control in the group is defined here.
Example
<controls side="1"> <control name="citysel" type="EDITBOX" onkeyenter="querynewlocation()" x="65" y="171" width="156" height="22" fontsize="10" fontname="Lucida Sans Unicode" fontstyle="B" visible="yes" fontcolor="clblack" fontbg="clHighlight" value="!XMLTXT:[//loc/dnam]"/> </controls>
Node Attributes
alpha The alpha value of the layer
fontalign Font alignment used in the control. The value is a string value containing any of the following. "LCRTMB" L=Left aligned, C=Centered, R=Right, T=Top, M=Middle, B=Bottom
fontbg Font background color used in the controls
fontcolor Font color used in the control. This can be represented as a RGB value or "Delphi" color names. #FF000 would be the RGB value for Red
fontname Font name used in the control
fontsize Font size used in the control
fontstyle Font style used in the control. The value is a string value containing any of the following, "BIUS" B=Bold, I=Italic, U=Underline, S=Strike Out
height Height of the control
listvalues List of values used in the control. Only used in some types of controls, such as a Dropdownlist
name Name of the control
password yes/no Set the control in password mode. Used in edit/text boxes
readonly yes/no Set the control in read-only mode.
scrollbarsize Define the maximum scrollbar size
type Control Type used. The following are the support types: TEXTFIELD,VERTICAL_SCROLLBAR,EDITBOX,DROPDOWNLIST,IMAGEBUTTON,LABEL
value Control value. This represents different things depending on the control. The position of the scrollbar, the text of a editbox, or the value of the drop down (not the same as the display value of the drop down.
visible yes/no Set the control visible or not
width Width of the control
x X position of the control
y Y position of the control
onchange The event triggered when the value of the control has changed.
onenter The event triggered when the user enters into the control.
onexit The event triggered when the user exits the control.
onkeyenter The event triggered when the enter key is pressed.
skindata / menus Name Description
menu Each menu can be created here. Max of 255. Child menuitems can be created in any of these menus.
Example
<menus> <menu showdefault="true"> <menuitem name="test1" type='MBB' onclick="this.alert("Hello")"> <menuitem name="subtest" onclick="Test()"/> </menuitem> <menuitem name="test2" onclick="Test()"/> </menu> </menus>
Node Attributes
id ID of the menu. ID=0 is the default for right clicks anywhere.
showdefault yes/no Include the default menu
onafterpopup OnAfterPopup event is triggered just after the menu is selected, but right before it's destroyed from memory
onbeforepopup OnBeforePopup event is triggered just before the menu is created
menuitem Each menu item is a selection item that can appear on the screen. Child menuitems can be created in any of these menus too; they become submenus.
Node Attributes
checked yes/no Set checked state of the menu item
enabled yes/no Set enabled state of the menu item
name Serves as the display text in the menu.
onclick This is the onclick event that will be triggered if the selection is made
type The type of menu. S - separator, MB - menubreak, MBB - menubarbreak
skindata / plugins Name Description
plugin Each plugin can be defined here. A plug must return a dispatch so that the script engine can use it.
Example
<plugins> <plugin name="Test" path="SoundPlug.dll" /> </plugins>
this.plugins("plugin_name")
Node Attributes
name This is the name of the plug in. This is the same name that is used in the script when trying mto refer to the plugin.
path This is the entire path to the dll/plugin.
skindata / hotkeys Name Description
HotKey Each HotKey can be defined here. A HotKey must have a key and onexecute script defined
Example
<hotkeys> <hotkey key="179" shiftkey="Alt Shift" onexecute="alert('execute')" /> </hotkeys>
Node Attributes
key This is the ascii / keyboard key that will trigger the hotkey
shiftkey This is the extra shift keys needed to trigger the hotkey. ('A' Alt, 'C' Ctrl, 'S' Shift, 'W' WinKey)
onexecute This is the script that will be triggered when the hotkey is executed.
layer source options Name Description
- No prefix will make the layer try to load a image file in the resource path
Example
<layer name="sample" src="img.png" /> This will load the img.png image for the layer.
<layer name="sample" src="img|mask" /> This example will load the img.png file and use the mask.png file to determine what areas will be displayed using maskvalue
<layer name="sample" src="A>img1>img2>img3" /> This will load 3 images and merge them left to right.
Node Attributes
| The | symbol can be used to have a masking image the first image is the entire image the second is the masking image used with the mask valueproperty. The masking image is a grey scale image. The luminece is used to determine what is shown from the first image. Both images must be the same size. The luminece can be from 0 - 255. This represets the 'brightness' of a color. 0 black 255 white. Example if the maskvalue is 100 then all pixels of luminece 100 and lower will be uncovered which will then will display the image below
> The > symbol can be used if you want to have a bunch of images loaded one next to each other. The first part is the type used. A,V across or vertical
!TXT: This prefix will let you make the layer a text layer.
Example
!TXT:HELLO WORLD, will display HELLO WORLD in the layer
!TXT:Hello|img.png will write Hello over an image entitled img.png
Node Attributes
| The | symbol can be used to have the text appear on an image.
!XMLTXT: This prefix will allow you to set the layer as a text layer, with a value coming from an XML source.
Example
!XMLTXT:1[\\node\value] will return the value from the XML ID 1 and the path \\node\value. IF the result text value includes | then it will also add the image like if it was !TXT:.
Node Attributes
The first value after the colon defines what xml source to use. Example: !XMLTXT:0[\\node\txt] will get data from the first engine. Remember that XML ids start at 0
[ ] XML data can come from more than 1 path for the selected engine. Each request is grouped by []. Example: XMLTXT:1[\\node\dd][\\node2\dd2]
!d Defines the delimiter used if the path has more than one result. Example: !XMLTXT:1[\\node\txt][!d ] will separate all values by a space !d
!c Defines the max number of characters the result from the xml will have. Example: !XMLTXT:1[\\node\txt][!c3] will set the value of the xml to 3 characters
!s Defines the letter/char used for the substring command. Only the chars before this will be used. Example: !XMLTXT:1[\\node\txt][!s,] Assuming the result is Hello, Mom , then this will truncate the result to Hello.
[''] Defines text value to be appended to the result. Example: !XMLTXT:1['NO'][\\node\txt]['TEST'] This will append the words NO and TEST to the xml result, before and after respectively.
!XMLSRC: This prefix will allow you to set the layer as an image layer. Also has the same options as !XMLTXT. Example: adding | will make it mask-enabled
!XMLTRANS: This prefix works similar to the other XML prefixes except this will use a XSL transformer, allowing you to do more complex functions. If you include !FILE: then it will load the XSL file to transform the result.
!XMLTRANSTXT: This is the same thing as !XMLTRANS except the result will be used as a text value.
!WEBIMG: This will make the layer extract/get the image from a web site / http path.
Example
<layer name="sample" src="!WEBIMG:http://www.test.com/img.png" /> This will connect to the internet site and download the requested image.
!HITSPOT Make the layer become a hot/hit spot with no image. This can be used to create invisible buttons.
Example
<layer name="sample" src="!HITSPOT" /> This will make the layer a invisible layer but "clickable"
!TXTFILE: This will load the text file into memory and display it on the layer. It is comma delimited to enter the start position and the number of lines. Example !TXTFILE:Hi.TXT,10,5 will load the hi.txt file, start from line 10, and read the next 5 lines.
Example
<layer name="sample" src="!TXTFILE:test.txt" /> This will load the test.txt file text data and display it in the layer.
!SCRIPT: The value for the source is defined by the script result for the selection function.
Example
<layer name="sample" src="!SCRIPT:GETINFO()" /> This will call the GetInfo() function which need to return a "string" value. This string value will contain the image that will be loaded or another type of src type.
!BLANKSPACE This will cause the layer to become a blank space. No image or text will be displayed
Example
<layer name="sample" src="!BLANKSPACE" />
!CANVAS This will set the layer to be a "Canvas" type layer. A Canvas layer is a layer that has the ability to draw directly into its paiting area by using the canvas commands at runtime.
Example
<layer name="sample" src="!CANVAS" />
!HIGHLIGHT This will cause the layer to highlight itself using the src image. This option is used on the msrc or dsrc.
Example
<layer name="sample" src="image.png" msrc="!HIGHLIGHT" />
layer event options Name Description
All the different type of prefixes that can be used on the onmousemove,enter,exit,click. If no prefix is used then it will execute the script command.
!FLIP: This will identify that the flip action is taken. The number following this prefix will identify what new side to flip to. example !FLIP:1 will flip to side 1
!EFFECT: Will execute the 'effect' when the event happens. The following are the effects supported.
Node Attributes
SHOW This effect has 4 comma delimited values. Target, AlphaValue, Increments, Speed. Target is the name of the layer you want the effect to happen to. The word SELF can be used if it is the layer on which the event is triggered from. Alpha value is the final resulting alpha value you want the layer to have. The increment (optional) is the number that will be used to increment each delay till the final value is used. The speed (optional) is the delay used between each increments.
HIDE This is the same thing as the Show effect except the result is to hide.
SLIDE This effect has 14 comma delimited values. Target, StartX1, StartY2, StartX2, StartY2, EndX1, EndY1, EndX2, EndY2, IncX1, IncY1, IncX2, IncY2, Speed. Target is the name of the layer you want the slide effect to happen on. StartX1, Y1, X2, Y2 is the rectangular area of the start slide effect. EndX1,Y1,X2,Y2 is the final rectangular area the layer will be at. IncX1,Y1,X2,Y2 is the increments used between the start and the end. Speed is the delay in Milliseconds that will be used between each increment till the slide has reached the end values.
System Variables Name Description
%THISMOUSEX% This will get the mouse X position with in the current layer
%THISMOUSEY% This will get the mouse Y position with in the current layer
%MOUSEX% This will get the mouse X position
%MOUSEY% This will get the mouse Y position
%MYDOC% or %MYDOCUMENTS% This will get the path of My Documents
%MYPICTURES% This will get the path of My Pictures
%MYVIDEOS% This will get the path of My Video
%MYMUSIC% This will get the path of My Music
%TMPPATH% This will get the Temporary Path
%SKINPATH% This will get the Skin Path
%SKINRESPATH% This will get the Skin Resource Path
%SKINCTRLPATH% This will get the path Control Resource Path
Extra Notes Name Description
Fonts If at anytime a new desklet uses a new type of font, you can create a subdirectory in the resource directory of the desklet. All font files *.fon *.ttf will automatically be installed.